package com.mxp.service;

import com.mxp.dao.UserDao;
import com.mxp.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;
import java.util.List;
import java.util.UUID;

/**
 * 服务
 */
@Service
public class UserService {

    /**
     * jdbcTemplate服务
     */
    @Autowired
    private UserDao userDao;

    /**
     * 查寻
     * @return
     */
    public List<User> listUser(User user) {
        List<User> list = userDao.listUser(user);
        return list;
    }

    /**
     * 插入
     * @return
     */
    @Transactional(rollbackFor = Throwable.class, propagation= Propagation.REQUIRED)
    public int insertUser() {
        return 0;
    }
}
